/*    */ package com.zimbra.cs.redolog.op;
/*    */ 
/*    */ import com.zimbra.cs.mailbox.Mailbox;
/*    */ import com.zimbra.cs.mailbox.MailboxManager;
/*    */ import com.zimbra.cs.mailbox.MailboxOperation;
/*    */ import com.zimbra.cs.redolog.RedoLogInput;
/*    */ import com.zimbra.cs.redolog.RedoLogOutput;
/*    */ import java.io.IOException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class SetWebOfflineSyncDays
/*    */   extends RedoableOp
/*    */ {
/*    */   private int folderId;
/*    */   private int days;
/*    */   
/*    */   public SetWebOfflineSyncDays()
/*    */   {
/* 33 */     super(MailboxOperation.SetWebOfflineSyncDays);
/* 34 */     this.folderId = -1;
/* 35 */     this.days = 0;
/*    */   }
/*    */   
/*    */   public SetWebOfflineSyncDays(int mailboxId, int folderId, int days) {
/* 39 */     this();
/* 40 */     setMailboxId(mailboxId);
/* 41 */     this.folderId = folderId;
/* 42 */     this.days = days;
/*    */   }
/*    */   
/*    */   protected String getPrintableData()
/*    */   {
/* 47 */     StringBuilder sb = new StringBuilder("id=").append(this.folderId);
/* 48 */     sb.append(", webofflinesyncdays=").append(this.days);
/* 49 */     return sb.toString();
/*    */   }
/*    */   
/*    */   protected void serializeData(RedoLogOutput out) throws IOException
/*    */   {
/* 54 */     out.writeInt(this.folderId);
/* 55 */     out.writeInt(this.days);
/*    */   }
/*    */   
/*    */   protected void deserializeData(RedoLogInput in) throws IOException
/*    */   {
/* 60 */     this.folderId = in.readInt();
/* 61 */     this.days = in.readInt();
/*    */   }
/*    */   
/*    */   public void redo() throws Exception
/*    */   {
/* 66 */     Mailbox mbox = MailboxManager.getInstance().getMailboxById(getMailboxId());
/* 67 */     mbox.setFolderWebOfflineSyncDays(getOperationContext(), this.folderId, this.days);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/redolog/op/SetWebOfflineSyncDays.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */